/**
 * Copyright(c): 2018 com.mjduan All rights reserved.
 * 项目名：learn-spring-mybatis
 * 注意：未经作者允许，不得外传
 */
package com.mjduan.project.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.mjduan.project.entity.Person;
import com.mjduan.project.mapper.PersonMapper;

/**
 * @author dmj1161859184@126.com 2019-10-27 16:10
 * @version 1.0
 * @since 1.0
 */
@Service
public class PersonService {
    @Autowired
    private PersonMapper personMapper;

    @Transactional(rollbackFor = Exception.class)
    public Person findByUsername(Person person){
        return personMapper.findByUsername(person);
    }

    @Transactional(rollbackFor = Exception.class)
    public void updateFltNum(Person person){
        personMapper.updateFltNum(person);
    }
}
